from django.db import models
from django.contrib.auth.models import User
# Create your models here.

class Users(models.Model):
    username = models.CharField(max_length=10,unique=True)
    password = models.CharField(max_length=256)
    mobile = models.CharField(max_length=11,unique=True)
    # identifier = models.CharField(max_length=40, unique=True)

    USERNAME_FIELD = 'username'
    REQUIRED_FIELDS = ['mobile']

    @property
    def is_authenticated(self):
        """
        Always return True. This is a way to tell if the user has been
        authenticated in templates.
        """
        return True
